package com.springboot.java.design.factory;

import com.springboot.java.design.model.Food;
import com.springboot.java.design.model.HuangMenChiKen;
import com.springboot.java.design.model.LanZhouNoodels;

/**
 * @Author: TongRui乀
 * @Date: 2019/3/5 13:43
 * @description：
 */
public class BeiJingFoodFactory implements FoodFactory {


    @Override
    public Food makeFood(String type) {

        if("A".equals(type)) {
            HuangMenChiKen huangMenChiKen = new HuangMenChiKen();

            huangMenChiKen.setName("黄焖鸡");

            return huangMenChiKen;
        }else if("B".equals(type)){
            LanZhouNoodels lanZhouNoodels = new LanZhouNoodels();

            lanZhouNoodels.setName("兰州拉面");

            return lanZhouNoodels;
        }

        return null;
    }
}
